<div>
    <div class="row" v-if="noticeManageInfo.componentShow == 'noticeList'">
        <div class="col-lg-12">
            <div class="ibox ">
                <div class="ibox-title">
                    <h5>
                        <span><vc:i18n name="查询条件" namespace="noticeManage"></vc:i18n></span>
                    </h5>
                    <div class="ibox-tools" style="top:10px;">
                        <button type="button" class="btn btn-link btn-sm" style="margin-right:10px;"
                                v-on:click="_moreCondition()">
                            {{noticeManageInfo.moreCondition == true?'隐藏':'更多'}}
                        </button>
                    </div>
                </div>
                <div class="ibox-content">
                    <div class="row">
                        <div class="col-sm-3">
                            <div class="form-group">
                                <input type="text" :placeholder="vc.i18n('请输入公告ID','noticeManage')"
                                       v-model="noticeManageInfo.conditions.noticeId" class=" form-control">
                            </div>
                        </div>
                        <div class="col-sm-4">
                            <div class="form-group">
                                <select class="custom-select" v-model="noticeManageInfo.conditions.noticeTypeCd">
                                    <option selected value="">{{vc.i18n('请选择公告类型','noticeManage')}}</option>
                                    <option value="1000">{{vc.i18n('业主通知','noticeManage')}}</option>
                                    <option value="1001">{{vc.i18n('员工通知','noticeManage')}}</option>
                                    <option value="1003">{{vc.i18n('业主微信通知','noticeManage')}}</option>
                                </select>
                            </div>
                        </div>
                        <div class="col-sm-3">
                            <div class="form-group">
                                <select class="custom-select" v-model="noticeManageInfo.conditions.state">
                                    <option selected value="">{{vc.i18n('请选择状态','noticeManage')}}</option>
                                    <option value="1000">{{vc.i18n('待通知','noticeManage')}}</option>
                                    <option value="2000">{{vc.i18n('通知中','noticeManage')}}</option>
                                    <option value="3000">{{vc.i18n('通知完成','noticeManage')}}</option>
                                </select>
                            </div>
                        </div>
                        <div class="col-sm-2">
                            <button type="button" class="btn btn-primary btn-sm" v-on:click="_queryNoticeMethod()">
                                <i class="fa fa-search"></i>
                                <span><vc:i18n name="查询" namespace="noticeManage"></vc:i18n></span>
                            </button>
                            <button type="button" class="btn btn-primary btn-sm" v-on:click="_resetNoticeMethod()">
                                <i class="fa fa-repeat"></i>
                                <span><vc:i18n name="重置" namespace="noticeManage"></vc:i18n></span>
                            </button>
                        </div>
                    </div>
                    <div class="row" v-show="noticeManageInfo.moreCondition == true">
                        <div class="col-sm-3">
                            <div class="form-group">
                                <input type="text" :placeholder="vc.i18n('请输入公告标题','noticeManage')"
                                       v-model="noticeManageInfo.conditions.title" class=" form-control">
                            </div>
                        </div>
                        <div class="col-sm-4">
                            <div class="form-group">
                                <input v-model="noticeManageInfo.conditions.startTime" readonly type="text"
                                       :placeholder="vc.i18n('必填，请填写开始时间','noticeManage')"
                                       class="form-control noticeStartTime">
                            </div>
                        </div>
                        <div class="col-sm-3">
                            <div class="form-group">
                                <input v-model="noticeManageInfo.conditions.endTime" readonly type="text"
                                       :placeholder="vc.i18n('必填，请填写结束时间','noticeManage')"
                                       class="form-control noticeEndTime">
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="row" v-if="noticeManageInfo.componentShow == 'noticeList'">
        <div class="col-lg-12">
            <div class="ibox">
                <div class="ibox-title">
                    <h5>
                        <span><vc:i18n name="公告信息" namespace="noticeManage"></vc:i18n></span>
                    </h5>
                    <div class="ibox-tools" style="top:10px;">
                        <button type="button" class="btn btn-primary btn-sm" v-on:click="_openAddNoticeModal()">
                            <i class="fa fa-plus"></i>
                            <span><vc:i18n name="发布" namespace="noticeManage"></vc:i18n></span>
                        </button>
                    </div>
                </div>
                <div class="ibox-content">
                    <table class="footable table table-stripped toggle-arrow-tiny" data-page-size="15">
                        <thead>
                        <tr>
                            <th class="text-center">
                                <span><vc:i18n name="公告" namespace="noticeManage"></vc:i18n></span>ID
                            </th>
                            <th class="text-center">
                                <span><vc:i18n name="标题" namespace="noticeManage"></vc:i18n></span>
                            </th>
                            <th class="text-center">
                                <span><vc:i18n name="公告类型" namespace="noticeManage"></vc:i18n></span>
                            </th>
                            <th class="text-center">
                                <span><vc:i18n name="开始时间" namespace="noticeManage"></vc:i18n></span>
                            </th>
                            <th class="text-center">
                                <span><vc:i18n name="结束时间" namespace="noticeManage"></vc:i18n></span>
                            </th>
                            <th class="text-center">
                                <span><vc:i18n name="状态" namespace="noticeManage"></vc:i18n></span>
                            </th>
                            <th class="text-center">
                                <span><vc:i18n name="通知范围" namespace="noticeManage"></vc:i18n></span>
                            </th>
                            <th class="text-center">
                                <span><vc:i18n name="操作" namespace="noticeManage"></vc:i18n></span>
                            </th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr v-for="notice in noticeManageInfo.notices">
                            <td class="text-center">{{notice.noticeId}}</td>
                            <td class="text-center">{{notice.title}}</td>
                            <td class="text-center">{{notice.noticeTypeCdName}}</td>
                            <td class="text-center">{{notice.startTime}}</td>
                            <td class="text-center">{{notice.endTime}}</td>
                            <td class="text-center">{{notice.stateName}}</td>
                            <td class="text-center">{{notice.objName}}</td>
                            <td class="text-center">
                                <div class="btn-group">
                                    <button class="btn-white btn btn-xs" v-on:click="_openNoticeDetail(notice)">
                                        <span><vc:i18n name="详情" namespace="noticeManage"></vc:i18n></span>
                                    </button>
                                </div>
                                <div class="btn-group">
                                    <button class="btn-white btn btn-xs" v-on:click="_openEditNoticeModel(notice)">
                                        <span><vc:i18n name="修改" namespace="noticeManage"></vc:i18n></span>
                                    </button>
                                </div>
                                <div class="btn-group" v-if="notice.state != '2000'">
                                    <button class="btn-white btn btn-xs" v-on:click="_openDeleteNoticeModel(notice)">
                                        <span><vc:i18n name="删除" namespace="noticeManage"></vc:i18n></span>
                                    </button>
                                </div>
                            </td>
                        </tr>
                        </tbody>
                        <tfoot>
                        <tr>
                            <td colspan="8">
                                <ul class="pagination float-right"></ul>
                            </td>
                        </tr>
                        </tfoot>
                    </table>
                    <!-- 分页 -->
                    <vc:create path="frame/pagination"></vc:create>
                </div>
            </div>
        </div>
    </div>
    <div v-bind:class="{no_display:noticeManageInfo.componentShow != 'addNoticeView'}">
        <vc:create path="common/addNoticeView"></vc:create>
    </div>
    <div v-bind:class="{no_display:noticeManageInfo.componentShow != 'editNoticeView'}">
        <vc:create path="common/editNoticeView"></vc:create>
    </div>
    <vc:create path="common/deleteNotice"></vc:create>
</div>
